package cn.com.dhcc.adam.spring.mvc.two;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.MatrixVariable;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value="/mpc")
public class MatrixPathController {
	
	@RequestMapping(value = "/pets/{petId}")
	public String findPet(@PathVariable String petId, @MatrixVariable int q, @MatrixVariable int r, Model model) {
		String info = "the result: petId = " + petId + ",q = " + q + ", r = " + r;
		System.out.println(info);
		model.addAttribute("message", info);
		return "matrix";
	}
}
